home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 2010 April / PCWorld0410.iso / pluginy Firefox / 722 / 722.xpi / chrome / noscript.jar / content / noscript / ABEParser.js < prev    next >
Text File  |  2010-02-12  |  33KB  |  1,002 lines

  1. // $ANTLR 3.1.1 X:\\CVS\\mozilla\\noscript\\ABE\\0.6\\ABE.g 2009-07-12 21:45:06
  2.  
  3. var ABEParser = function(input, state) {
  4.     if (!state) {
  5.         state = new org.antlr.runtime.RecognizerSharedState();
  6.     }
  7.  
  8.     (function(){
  9.     }).call(this);
  10.  
  11.     ABEParser.superclass.constructor.call(this, input, state);
  12.  
  13.  
  14.          
  15.  
  16.     /* @todo only create adaptor if output=AST */
  17.     this.adaptor = new org.antlr.runtime.tree.CommonTreeAdaptor();
  18.  
  19. };
  20.  
  21. org.antlr.lang.augmentObject(ABEParser, {
  22.     T_FROM: 9,
  23.     HTTPVERB: 7,
  24.     GLOB: 12,
  25.     A_LOGOUT: 16,
  26.     A_DENY: 15,
  27.     T_ACTION: 4,
  28.     SUB: 8,
  29.     T_METHODS: 5,
  30.     EOF: -1,
  31.     URI: 13,
  32.     WS: 21,
  33.     URI_PART: 20,
  34.     A_SANDBOX: 17,
  35.     URI_START: 19,
  36.     ALL: 6,
  37.     A_ACCEPT: 18,
  38.     REGEXP: 11,
  39.     LOCATION: 14,
  40.     T_SITE: 10,
  41.     COMMENT: 22
  42. });
  43.  
  44. (function(){
  45. // public class variables
  46. var T_FROM= 9,
  47.     HTTPVERB= 7,
  48.     GLOB= 12,
  49.     A_LOGOUT= 16,
  50.     A_DENY= 15,
  51.     T_ACTION= 4,
  52.     SUB= 8,
  53.     T_METHODS= 5,
  54.     EOF= -1,
  55.     URI= 13,
  56.     WS= 21,
  57.     URI_PART= 20,
  58.     A_SANDBOX= 17,
  59.     URI_START= 19,
  60.     ALL= 6,
  61.     A_ACCEPT= 18,
  62.     REGEXP= 11,
  63.     LOCATION= 14,
  64.     T_SITE= 10,
  65.     COMMENT= 22;
  66.  
  67. // public instance methods/vars
  68. org.antlr.lang.extend(ABEParser, org.antlr.runtime.Parser, {
  69.         
  70.     setTreeAdaptor: function(adaptor) {
  71.         this.adaptor = adaptor;
  72.     },
  73.     getTreeAdaptor: function() {
  74.         return this.adaptor;
  75.     },
  76.  
  77.     getTokenNames: function() { return ABEParser.tokenNames; },
  78.     getGrammarFileName: function() { return "X:\\CVS\\mozilla\\noscript\\ABE\\0.6\\ABE.g"; }
  79. });
  80. org.antlr.lang.augmentObject(ABEParser.prototype, {
  81.  
  82.     // inline static return class
  83.     ruleset_return: (function() {
  84.         ABEParser.ruleset_return = function(){};
  85.         org.antlr.lang.extend(ABEParser.ruleset_return,
  86.                           org.antlr.runtime.ParserRuleReturnScope,
  87.         {
  88.             getTree: function() { return this.tree; }
  89.         });
  90.         return;
  91.     })(),
  92.  
  93.     // X:\\CVS\\mozilla\\noscript\\ABE\\0.6\\ABE.g:13:1: ruleset : ( rule )* EOF ;
  94.     // $ANTLR start "ruleset"
  95.     ruleset: function() {
  96.         var retval = new ABEParser.ruleset_return();
  97.         retval.start = this.input.LT(1);
  98.  
  99.         var root_0 = null;
  100.  
  101.         var EOF2 = null;
  102.          var rule1 = null;
  103.  
  104.         var EOF2_tree=null;
  105.  
  106.         try {
  107.             // X:\\CVS\\mozilla\\noscript\\ABE\\0.6\\ABE.g:13:11: ( ( rule )* EOF )
  108.             // X:\\CVS\\mozilla\\noscript\\ABE\\0.6\\ABE.g:13:13: ( rule )* EOF
  109.             root_0 = this.adaptor.nil();
  110.  
  111.             // X:\\CVS\\mozilla\\noscript\\ABE\\0.6\\ABE.g:13:13: ( rule )*
  112.             loop1:
  113.             do {
  114.                 var alt1=2;
  115.                 var LA1_0 = this.input.LA(1);
  116.  
  117.                 if ( (LA1_0==T_SITE) ) {
  118.                     alt1=1;
  119.                 }
  120.  
  121.  
  122.                 switch (alt1) {
  123.                 case 1 :
  124.                     // X:\\CVS\\mozilla\\noscript\\ABE\\0.6\\ABE.g:13:13: rule
  125.                     this.pushFollow(ABEParser.FOLLOW_rule_in_ruleset49);
  126.                     rule1=this.rule();
  127.  
  128.                     this.state._fsp--;
  129.  
  130.                     this.adaptor.addChild(root_0, rule1.getTree());
  131.  
  132.  
  133.                     break;
  134.  
  135.                 default :
  136.                     break loop1;
  137.                 }
  138.             } while (true);
  139.  
  140.             EOF2=this.match(this.input,EOF,ABEParser.FOLLOW_EOF_in_ruleset52); 
  141.             EOF2_tree = this.adaptor.create(EOF2);
  142.             this.adaptor.addChild(root_0, EOF2_tree);
  143.  
  144.  
  145.  
  146.  
  147.             retval.stop = this.input.LT(-1);
  148.  
  149.             retval.tree = this.adaptor.rulePostProcessing(root_0);
  150.             this.adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
  151.  
  152.         }
  153.         catch (re) {
  154.             if (re instanceof org.antlr.runtime.RecognitionException) {
  155.                 this.reportError(re);
  156.                 this.recover(this.input,re);
  157.                 retval.tree = this.adaptor.errorNode(this.input, retval.start, this.input.LT(-1), re);
  158.             } else {
  159.                 throw re;
  160.             }
  161.         }
  162.         finally {
  163.         }
  164.         return retval;
  165.     },
  166.  
  167.     // inline static return class
  168.     rule_return: (function() {
  169.         ABEParser.rule_return = function(){};
  170.         org.antlr.lang.extend(ABEParser.rule_return,
  171.                           org.antlr.runtime.ParserRuleReturnScope,
  172.         {
  173.             getTree: function() { return this.tree; }
  174.         });
  175.         return;
  176.     })(),
  177.  
  178.     // X:\\CVS\\mozilla\\noscript\\ABE\\0.6\\ABE.g:15:1: rule : subject ( predicate )+ -> subject ( predicate )+ ;
  179.     // $ANTLR start "rule"
  180.     rule: function() {
  181.         var retval = new ABEParser.rule_return();
  182.         retval.start = this.input.LT(1);
  183.  
  184.         var root_0 = null;
  185.  
  186.          var subject3 = null;
  187.          var predicate4 = null;
  188.  
  189.         var stream_subject=new org.antlr.runtime.tree.RewriteRuleSubtreeStream(this.adaptor,"rule subject");
  190.         var stream_predicate=new org.antlr.runtime.tree.RewriteRuleSubtreeStream(this.adaptor,"rule predicate");
  191.         try {
  192.             // X:\\CVS\\mozilla\\noscript\\ABE\\0.6\\ABE.g:15:11: ( subject ( predicate )+ -> subject ( predicate )+ )
  193.             // X:\\CVS\\mozilla\\noscript\\ABE\\0.6\\ABE.g:15:13: subject ( predicate )+
  194.             this.pushFollow(ABEParser.FOLLOW_subject_in_rule65);
  195.             subject3=this.subject();
  196.  
  197.             this.state._fsp--;
  198.  
  199.             stream_subject.add(subject3.getTree());
  200.             // X:\\CVS\\mozilla\\noscript\\ABE\\0.6\\ABE.g:15:21: ( predicate )+
  201.             var cnt2=0;
  202.             loop2:
  203.             do {
  204.                 var alt2=2;
  205.                 var LA2_0 = this.input.LA(1);
  206.  
  207.                 if ( ((LA2_0>=A_DENY && LA2_0<=A_ACCEPT)) ) {
  208.                     alt2=1;
  209.                 }
  210.  
  211.  
  212.                 switch (alt2) {
  213.                 case 1 :
  214.                     // X:\\CVS\\mozilla\\noscript\\ABE\\0.6\\ABE.g:15:21: predicate
  215.                     this.pushFollow(ABEParser.FOLLOW_predicate_in_rule67);
  216.                     predicate4=this.predicate();
  217.  
  218.                     this.state._fsp--;
  219.  
  220.                     stream_predicate.add(predicate4.getTree());
  221.  
  222.  
  223.                     break;
  224.  
  225.                 default :
  226.                     if ( cnt2 >= 1 ) {
  227.                         break loop2;
  228.                     }
  229.                         var eee = new org.antlr.runtime.EarlyExitException(2, this.input);
  230.                         throw eee;
  231.                 }
  232.                 cnt2++;
  233.             } while (true);
  234.  
  235.  
  236.  
  237.             // AST REWRITE
  238.             // elements: predicate, subject
  239.             // token labels: 
  240.             // rule labels: retval
  241.             // token list labels: 
  242.             // rule list labels: 
  243.             retval.tree = root_0;
  244.             var stream_retval=new org.antlr.runtime.tree.RewriteRuleSubtreeStream(this.adaptor,"token retval",retval!=null?retval.tree:null);
  245.  
  246.             root_0 = this.adaptor.nil();
  247.             // 15:32: -> subject ( predicate )+
  248.             {
  249.                 this.adaptor.addChild(root_0, stream_subject.nextTree());
  250.                 if ( !(stream_predicate.hasNext()) ) {
  251.                     throw new org.antlr.runtime.tree.RewriteEarlyExitException();
  252.                 }
  253.                 while ( stream_predicate.hasNext() ) {
  254.                     this.adaptor.addChild(root_0, stream_predicate.nextTree());
  255.  
  256.                 }
  257.                 stream_predicate.reset();
  258.  
  259.             }
  260.  
  261.             retval.tree = root_0;
  262.  
  263.  
  264.             retval.stop = this.input.LT(-1);
  265.  
  266.             retval.tree = this.adaptor.rulePostProcessing(root_0);
  267.             this.adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
  268.  
  269.         }
  270.         catch (re) {
  271.             if (re instanceof org.antlr.runtime.RecognitionException) {
  272.                 this.reportError(re);
  273.                 this.recover(this.input,re);
  274.                 retval.tree = this.adaptor.errorNode(this.input, retval.start, this.input.LT(-1), re);
  275.             } else {
  276.                 throw re;
  277.             }
  278.         }
  279.         finally {
  280.         }
  281.         return retval;
  282.     },
  283.  
  284.     // inline static return class
  285.     predicate_return: (function() {
  286.         ABEParser.predicate_return = function(){};
  287.         org.antlr.lang.extend(ABEParser.predicate_return,
  288.                           org.antlr.runtime.ParserRuleReturnScope,
  289.         {
  290.             getTree: function() { return this.tree; }
  291.         });
  292.         return;
  293.     })(),
  294.  
  295.     // X:\\CVS\\mozilla\\noscript\\ABE\\0.6\\ABE.g:17:1: predicate : action ( methods )? ( origin )? -> T_ACTION action T_METHODS ( methods )? ( origin )? ;
  296.     // $ANTLR start "predicate"
  297.     predicate: function() {
  298.         var retval = new ABEParser.predicate_return();
  299.         retval.start = this.input.LT(1);
  300.  
  301.         var root_0 = null;
  302.  
  303.          var action5 = null;
  304.          var methods6 = null;
  305.          var origin7 = null;
  306.  
  307.         var stream_methods=new org.antlr.runtime.tree.RewriteRuleSubtreeStream(this.adaptor,"rule methods");
  308.         var stream_action=new org.antlr.runtime.tree.RewriteRuleSubtreeStream(this.adaptor,"rule action");
  309.         var stream_origin=new org.antlr.runtime.tree.RewriteRuleSubtreeStream(this.adaptor,"rule origin");
  310.         try {
  311.             // X:\\CVS\\mozilla\\noscript\\ABE\\0.6\\ABE.g:17:11: ( action ( methods )? ( origin )? -> T_ACTION action T_METHODS ( methods )? ( origin )? )
  312.             // X:\\CVS\\mozilla\\noscript\\ABE\\0.6\\ABE.g:17:13: action ( methods )? ( origin )?
  313.             this.pushFollow(ABEParser.FOLLOW_action_in_predicate84);
  314.             action5=this.action();
  315.  
  316.             this.state._fsp--;
  317.  
  318.             stream_action.add(action5.getTree());
  319.             // X:\\CVS\\mozilla\\noscript\\ABE\\0.6\\ABE.g:17:20: ( methods )?
  320.             var alt3=2;
  321.             var LA3_0 = this.input.LA(1);
  322.  
  323.             if ( ((LA3_0>=ALL && LA3_0<=SUB)) ) {
  324.                 alt3=1;
  325.             }
  326.             switch (alt3) {
  327.                 case 1 :
  328.                     // X:\\CVS\\mozilla\\noscript\\ABE\\0.6\\ABE.g:17:20: methods
  329.                     this.pushFollow(ABEParser.FOLLOW_methods_in_predicate86);
  330.                     methods6=this.methods();
  331.  
  332.                     this.state._fsp--;
  333.  
  334.                     stream_methods.add(methods6.getTree());
  335.  
  336.  
  337.                     break;
  338.  
  339.             }
  340.  
  341.             // X:\\CVS\\mozilla\\noscript\\ABE\\0.6\\ABE.g:17:29: ( origin )?
  342.             var alt4=2;
  343.             var LA4_0 = this.input.LA(1);
  344.  
  345.             if ( (LA4_0==T_FROM) ) {
  346.                 alt4=1;
  347.             }
  348.             switch (alt4) {
  349.                 case 1 :
  350.                     // X:\\CVS\\mozilla\\noscript\\ABE\\0.6\\ABE.g:17:29: origin
  351.                     this.pushFollow(ABEParser.FOLLOW_origin_in_predicate89);
  352.                     origin7=this.origin();
  353.  
  354.                     this.state._fsp--;
  355.  
  356.                     stream_origin.add(origin7.getTree());
  357.  
  358.  
  359.                     break;
  360.  
  361.             }
  362.  
  363.  
  364.  
  365.             // AST REWRITE
  366.             // elements: origin, methods, action
  367.             // token labels: 
  368.             // rule labels: retval
  369.             // token list labels: 
  370.             // rule list labels: 
  371.             retval.tree = root_0;
  372.             var stream_retval=new org.antlr.runtime.tree.RewriteRuleSubtreeStream(this.adaptor,"token retval",retval!=null?retval.tree:null);
  373.  
  374.             root_0 = this.adaptor.nil();
  375.             // 17:37: -> T_ACTION action T_METHODS ( methods )? ( origin )?
  376.             {
  377.                 this.adaptor.addChild(root_0, this.adaptor.create(T_ACTION, "T_ACTION"));
  378.                 this.adaptor.addChild(root_0, stream_action.nextTree());
  379.                 this.adaptor.addChild(root_0, this.adaptor.create(T_METHODS, "T_METHODS"));
  380.                 // X:\\CVS\\mozilla\\noscript\\ABE\\0.6\\ABE.g:17:66: ( methods )?
  381.                 if ( stream_methods.hasNext() ) {
  382.                     this.adaptor.addChild(root_0, stream_methods.nextTree());
  383.  
  384.                 }
  385.                 stream_methods.reset();
  386.                 // X:\\CVS\\mozilla\\noscript\\ABE\\0.6\\ABE.g:17:75: ( origin )?
  387.                 if ( stream_origin.hasNext() ) {
  388.                     this.adaptor.addChild(root_0, stream_origin.nextTree());
  389.  
  390.                 }
  391.                 stream_origin.reset();
  392.  
  393.             }
  394.  
  395.             retval.tree = root_0;
  396.  
  397.  
  398.             retval.stop = this.input.LT(-1);
  399.  
  400.             retval.tree = this.adaptor.rulePostProcessing(root_0);
  401.             this.adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
  402.  
  403.         }
  404.         catch (re) {
  405.             if (re instanceof org.antlr.runtime.RecognitionException) {
  406.                 this.reportError(re);
  407.                 this.recover(this.input,re);
  408.                 retval.tree = this.adaptor.errorNode(this.input, retval.start, this.input.LT(-1), re);
  409.             } else {
  410.                 throw re;
  411.             }
  412.         }
  413.         finally {
  414.         }
  415.         return retval;
  416.     },
  417.  
  418.     // inline static return class
  419.     methods_return: (function() {
  420.         ABEParser.methods_return = function(){};
  421.         org.antlr.lang.extend(ABEParser.methods_return,
  422.                           org.antlr.runtime.ParserRuleReturnScope,
  423.         {
  424.             getTree: function() { return this.tree; }
  425.         });
  426.         return;
  427.     })(),
  428.  
  429.     // X:\\CVS\\mozilla\\noscript\\ABE\\0.6\\ABE.g:19:1: methods : ( ( method )+ | ALL ) ;
  430.     // $ANTLR start "methods"
  431.     methods: function() {
  432.         var retval = new ABEParser.methods_return();
  433.         retval.start = this.input.LT(1);
  434.  
  435.         var root_0 = null;
  436.  
  437.         var ALL9 = null;
  438.          var method8 = null;
  439.  
  440.         var ALL9_tree=null;
  441.  
  442.         try {
  443.             // X:\\CVS\\mozilla\\noscript\\ABE\\0.6\\ABE.g:19:11: ( ( ( method )+ | ALL ) )
  444.             // X:\\CVS\\mozilla\\noscript\\ABE\\0.6\\ABE.g:19:13: ( ( method )+ | ALL )
  445.             root_0 = this.adaptor.nil();
  446.  
  447.             // X:\\CVS\\mozilla\\noscript\\ABE\\0.6\\ABE.g:19:13: ( ( method )+ | ALL )
  448.             var alt6=2;
  449.             var LA6_0 = this.input.LA(1);
  450.  
  451.             if ( ((LA6_0>=HTTPVERB && LA6_0<=SUB)) ) {
  452.                 alt6=1;
  453.             }
  454.             else if ( (LA6_0==ALL) ) {
  455.                 alt6=2;
  456.             }
  457.             else {
  458.                 var nvae =
  459.                     new org.antlr.runtime.NoViableAltException("", 6, 0, this.input);
  460.  
  461.                 throw nvae;
  462.             }
  463.             switch (alt6) {
  464.                 case 1 :
  465.                     // X:\\CVS\\mozilla\\noscript\\ABE\\0.6\\ABE.g:19:14: ( method )+
  466.                     // X:\\CVS\\mozilla\\noscript\\ABE\\0.6\\ABE.g:19:14: ( method )+
  467.                     var cnt5=0;
  468.                     loop5:
  469.                     do {
  470.                         var alt5=2;
  471.                         var LA5_0 = this.input.LA(1);
  472.  
  473.                         if ( ((LA5_0>=HTTPVERB && LA5_0<=SUB)) ) {
  474.                             alt5=1;
  475.                         }
  476.  
  477.  
  478.                         switch (alt5) {
  479.                         case 1 :
  480.                             // X:\\CVS\\mozilla\\noscript\\ABE\\0.6\\ABE.g:19:14: method
  481.                             this.pushFollow(ABEParser.FOLLOW_method_in_methods115);
  482.                             method8=this.method();
  483.  
  484.                             this.state._fsp--;
  485.  
  486.                             this.adaptor.addChild(root_0, method8.getTree());
  487.  
  488.  
  489.                             break;
  490.  
  491.                         default :
  492.                             if ( cnt5 >= 1 ) {
  493.                                 break loop5;
  494.                             }
  495.                                 var eee = new org.antlr.runtime.EarlyExitException(5, this.input);
  496.                                 throw eee;
  497.                         }
  498.                         cnt5++;
  499.                     } while (true);
  500.  
  501.  
  502.  
  503.                     break;
  504.                 case 2 :
  505.                     // X:\\CVS\\mozilla\\noscript\\ABE\\0.6\\ABE.g:19:24: ALL
  506.                     ALL9=this.match(this.input,ALL,ABEParser.FOLLOW_ALL_in_methods120); 
  507.                     ALL9_tree = this.adaptor.create(ALL9);
  508.                     this.adaptor.addChild(root_0, ALL9_tree);
  509.  
  510.  
  511.  
  512.                     break;
  513.  
  514.             }
  515.  
  516.  
  517.  
  518.  
  519.             retval.stop = this.input.LT(-1);
  520.  
  521.             retval.tree = this.adaptor.rulePostProcessing(root_0);
  522.             this.adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
  523.  
  524.         }
  525.         catch (re) {
  526.             if (re instanceof org.antlr.runtime.RecognitionException) {
  527.                 this.reportError(re);
  528.                 this.recover(this.input,re);
  529.                 retval.tree = this.adaptor.errorNode(this.input, retval.start, this.input.LT(-1), re);
  530.             } else {
  531.                 throw re;
  532.             }
  533.         }
  534.         finally {
  535.         }
  536.         return retval;
  537.     },
  538.  
  539.     // inline static return class
  540.     method_return: (function() {
  541.         ABEParser.method_return = function(){};
  542.         org.antlr.lang.extend(ABEParser.method_return,
  543.                           org.antlr.runtime.ParserRuleReturnScope,
  544.         {
  545.             getTree: function() { return this.tree; }
  546.         });
  547.         return;
  548.     })(),
  549.  
  550.     // X:\\CVS\\mozilla\\noscript\\ABE\\0.6\\ABE.g:21:1: method : ( HTTPVERB | SUB ) ;
  551.     // $ANTLR start "method"
  552.     method: function() {
  553.         var retval = new ABEParser.method_return();
  554.         retval.start = this.input.LT(1);
  555.  
  556.         var root_0 = null;
  557.  
  558.         var set10 = null;
  559.  
  560.         var set10_tree=null;
  561.  
  562.         try {
  563.             // X:\\CVS\\mozilla\\noscript\\ABE\\0.6\\ABE.g:21:11: ( ( HTTPVERB | SUB ) )
  564.             // X:\\CVS\\mozilla\\noscript\\ABE\\0.6\\ABE.g:21:13: ( HTTPVERB | SUB )
  565.             root_0 = this.adaptor.nil();
  566.  
  567.             set10=this.input.LT(1);
  568.             if ( (this.input.LA(1)>=HTTPVERB && this.input.LA(1)<=SUB) ) {
  569.                 this.input.consume();
  570.                 this.adaptor.addChild(root_0, this.adaptor.create(set10));
  571.                 this.state.errorRecovery=false;
  572.             }
  573.             else {
  574.                 var mse = new org.antlr.runtime.MismatchedSetException(null,this.input);
  575.                 throw mse;
  576.             }
  577.  
  578.  
  579.  
  580.  
  581.             retval.stop = this.input.LT(-1);
  582.  
  583.             retval.tree = this.adaptor.rulePostProcessing(root_0);
  584.             this.adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
  585.  
  586.         }
  587.         catch (re) {
  588.             if (re instanceof org.antlr.runtime.RecognitionException) {
  589.                 this.reportError(re);
  590.                 this.recover(this.input,re);
  591.                 retval.tree = this.adaptor.errorNode(this.input, retval.start, this.input.LT(-1), re);
  592.             } else {
  593.                 throw re;
  594.             }
  595.         }
  596.         finally {
  597.         }
  598.         return retval;
  599.     },
  600.  
  601.     // inline static return class
  602.     origin_return: (function() {
  603.         ABEParser.origin_return = function(){};
  604.         org.antlr.lang.extend(ABEParser.origin_return,
  605.                           org.antlr.runtime.ParserRuleReturnScope,
  606.         {
  607.             getTree: function() { return this.tree; }
  608.         });
  609.         return;
  610.     })(),
  611.  
  612.     // X:\\CVS\\mozilla\\noscript\\ABE\\0.6\\ABE.g:23:1: origin : T_FROM resources ;
  613.     // $ANTLR start "origin"
  614.     origin: function() {
  615.         var retval = new ABEParser.origin_return();
  616.         retval.start = this.input.LT(1);
  617.  
  618.         var root_0 = null;
  619.  
  620.         var T_FROM11 = null;
  621.          var resources12 = null;
  622.  
  623.         var T_FROM11_tree=null;
  624.  
  625.         try {
  626.             // X:\\CVS\\mozilla\\noscript\\ABE\\0.6\\ABE.g:23:11: ( T_FROM resources )
  627.             // X:\\CVS\\mozilla\\noscript\\ABE\\0.6\\ABE.g:23:13: T_FROM resources
  628.             root_0 = this.adaptor.nil();
  629.  
  630.             T_FROM11=this.match(this.input,T_FROM,ABEParser.FOLLOW_T_FROM_in_origin149); 
  631.             T_FROM11_tree = this.adaptor.create(T_FROM11);
  632.             this.adaptor.addChild(root_0, T_FROM11_tree);
  633.  
  634.             this.pushFollow(ABEParser.FOLLOW_resources_in_origin151);
  635.             resources12=this.resources();
  636.  
  637.             this.state._fsp--;
  638.  
  639.             this.adaptor.addChild(root_0, resources12.getTree());
  640.  
  641.  
  642.  
  643.             retval.stop = this.input.LT(-1);
  644.  
  645.             retval.tree = this.adaptor.rulePostProcessing(root_0);
  646.             this.adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
  647.  
  648.         }
  649.         catch (re) {
  650.             if (re instanceof org.antlr.runtime.RecognitionException) {
  651.                 this.reportError(re);
  652.                 this.recover(this.input,re);
  653.                 retval.tree = this.adaptor.errorNode(this.input, retval.start, this.input.LT(-1), re);
  654.             } else {
  655.                 throw re;
  656.             }
  657.         }
  658.         finally {
  659.         }
  660.         return retval;
  661.     },
  662.  
  663.     // inline static return class
  664.     subject_return: (function() {
  665.         ABEParser.subject_return = function(){};
  666.         org.antlr.lang.extend(ABEParser.subject_return,
  667.                           org.antlr.runtime.ParserRuleReturnScope,
  668.         {
  669.             getTree: function() { return this.tree; }
  670.         });
  671.         return;
  672.     })(),
  673.  
  674.     // X:\\CVS\\mozilla\\noscript\\ABE\\0.6\\ABE.g:25:1: subject : T_SITE resources ;
  675.     // $ANTLR start "subject"
  676.     subject: function() {
  677.         var retval = new ABEParser.subject_return();
  678.         retval.start = this.input.LT(1);
  679.  
  680.         var root_0 = null;
  681.  
  682.         var T_SITE13 = null;
  683.          var resources14 = null;
  684.  
  685.         var T_SITE13_tree=null;
  686.  
  687.         try {
  688.             // X:\\CVS\\mozilla\\noscript\\ABE\\0.6\\ABE.g:25:11: ( T_SITE resources )
  689.             // X:\\CVS\\mozilla\\noscript\\ABE\\0.6\\ABE.g:25:13: T_SITE resources
  690.             root_0 = this.adaptor.nil();
  691.  
  692.             T_SITE13=this.match(this.input,T_SITE,ABEParser.FOLLOW_T_SITE_in_subject162); 
  693.             T_SITE13_tree = this.adaptor.create(T_SITE13);
  694.             this.adaptor.addChild(root_0, T_SITE13_tree);
  695.  
  696.             this.pushFollow(ABEParser.FOLLOW_resources_in_subject164);
  697.             resources14=this.resources();
  698.  
  699.             this.state._fsp--;
  700.  
  701.             this.adaptor.addChild(root_0, resources14.getTree());
  702.  
  703.  
  704.  
  705.             retval.stop = this.input.LT(-1);
  706.  
  707.             retval.tree = this.adaptor.rulePostProcessing(root_0);
  708.             this.adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
  709.  
  710.         }
  711.         catch (re) {
  712.             if (re instanceof org.antlr.runtime.RecognitionException) {
  713.                 this.reportError(re);
  714.                 this.recover(this.input,re);
  715.                 retval.tree = this.adaptor.errorNode(this.input, retval.start, this.input.LT(-1), re);
  716.             } else {
  717.                 throw re;
  718.             }
  719.         }
  720.         finally {
  721.         }
  722.         return retval;
  723.     },
  724.  
  725.     // inline static return class
  726.     resources_return: (function() {
  727.         ABEParser.resources_return = function(){};
  728.         org.antlr.lang.extend(ABEParser.resources_return,
  729.                           org.antlr.runtime.ParserRuleReturnScope,
  730.         {
  731.             getTree: function() { return this.tree; }
  732.         });
  733.         return;
  734.     })(),
  735.  
  736.     // X:\\CVS\\mozilla\\noscript\\ABE\\0.6\\ABE.g:27:1: resources : ( ( resource )+ | ALL ) ;
  737.     // $ANTLR start "resources"
  738.     resources: function() {
  739.         var retval = new ABEParser.resources_return();
  740.         retval.start = this.input.LT(1);
  741.  
  742.         var root_0 = null;
  743.  
  744.         var ALL16 = null;
  745.          var resource15 = null;
  746.  
  747.         var ALL16_tree=null;
  748.  
  749.         try {
  750.             // X:\\CVS\\mozilla\\noscript\\ABE\\0.6\\ABE.g:27:11: ( ( ( resource )+ | ALL ) )
  751.             // X:\\CVS\\mozilla\\noscript\\ABE\\0.6\\ABE.g:27:13: ( ( resource )+ | ALL )
  752.             root_0 = this.adaptor.nil();
  753.  
  754.             // X:\\CVS\\mozilla\\noscript\\ABE\\0.6\\ABE.g:27:13: ( ( resource )+ | ALL )
  755.             var alt8=2;
  756.             var LA8_0 = this.input.LA(1);
  757.  
  758.             if ( ((LA8_0>=REGEXP && LA8_0<=LOCATION)) ) {
  759.                 alt8=1;
  760.             }
  761.             else if ( (LA8_0==ALL) ) {
  762.                 alt8=2;
  763.             }
  764.             else {
  765.                 var nvae =
  766.                     new org.antlr.runtime.NoViableAltException("", 8, 0, this.input);
  767.  
  768.                 throw nvae;
  769.             }
  770.             switch (alt8) {
  771.                 case 1 :
  772.                     // X:\\CVS\\mozilla\\noscript\\ABE\\0.6\\ABE.g:27:14: ( resource )+
  773.                     // X:\\CVS\\mozilla\\noscript\\ABE\\0.6\\ABE.g:27:14: ( resource )+
  774.                     var cnt7=0;
  775.                     loop7:
  776.                     do {
  777.                         var alt7=2;
  778.                         var LA7_0 = this.input.LA(1);
  779.  
  780.                         if ( ((LA7_0>=REGEXP && LA7_0<=LOCATION)) ) {
  781.                             alt7=1;
  782.                         }
  783.  
  784.  
  785.                         switch (alt7) {
  786.                         case 1 :
  787.                             // X:\\CVS\\mozilla\\noscript\\ABE\\0.6\\ABE.g:27:14: resource
  788.                             this.pushFollow(ABEParser.FOLLOW_resource_in_resources173);
  789.                             resource15=this.resource();
  790.  
  791.                             this.state._fsp--;
  792.  
  793.                             this.adaptor.addChild(root_0, resource15.getTree());
  794.  
  795.  
  796.                             break;
  797.  
  798.                         default :
  799.                             if ( cnt7 >= 1 ) {
  800.                                 break loop7;
  801.                             }
  802.                                 var eee = new org.antlr.runtime.EarlyExitException(7, this.input);
  803.                                 throw eee;
  804.                         }
  805.                         cnt7++;
  806.                     } while (true);
  807.  
  808.  
  809.  
  810.                     break;
  811.                 case 2 :
  812.                     // X:\\CVS\\mozilla\\noscript\\ABE\\0.6\\ABE.g:27:26: ALL
  813.                     ALL16=this.match(this.input,ALL,ABEParser.FOLLOW_ALL_in_resources178); 
  814.                     ALL16_tree = this.adaptor.create(ALL16);
  815.                     this.adaptor.addChild(root_0, ALL16_tree);
  816.  
  817.  
  818.  
  819.                     break;
  820.  
  821.             }
  822.  
  823.  
  824.  
  825.  
  826.             retval.stop = this.input.LT(-1);
  827.  
  828.             retval.tree = this.adaptor.rulePostProcessing(root_0);
  829.             this.adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
  830.  
  831.         }
  832.         catch (re) {
  833.             if (re instanceof org.antlr.runtime.RecognitionException) {
  834.                 this.reportError(re);
  835.                 this.recover(this.input,re);
  836.                 retval.tree = this.adaptor.errorNode(this.input, retval.start, this.input.LT(-1), re);
  837.             } else {
  838.                 throw re;
  839.             }
  840.         }
  841.         finally {
  842.         }
  843.         return retval;
  844.     },
  845.  
  846.     // inline static return class
  847.     resource_return: (function() {
  848.         ABEParser.resource_return = function(){};
  849.         org.antlr.lang.extend(ABEParser.resource_return,
  850.                           org.antlr.runtime.ParserRuleReturnScope,
  851.         {
  852.             getTree: function() { return this.tree; }
  853.         });
  854.         return;
  855.     })(),
  856.  
  857.     // X:\\CVS\\mozilla\\noscript\\ABE\\0.6\\ABE.g:29:1: resource : ( REGEXP | GLOB | URI | LOCATION );
  858.     // $ANTLR start "resource"
  859.     resource: function() {
  860.         var retval = new ABEParser.resource_return();
  861.         retval.start = this.input.LT(1);
  862.  
  863.         var root_0 = null;
  864.  
  865.         var set17 = null;
  866.  
  867.         var set17_tree=null;
  868.  
  869.         try {
  870.             // X:\\CVS\\mozilla\\noscript\\ABE\\0.6\\ABE.g:29:11: ( REGEXP | GLOB | URI | LOCATION )
  871.             // X:\\CVS\\mozilla\\noscript\\ABE\\0.6\\ABE.g:
  872.             root_0 = this.adaptor.nil();
  873.  
  874.             set17=this.input.LT(1);
  875.             if ( (this.input.LA(1)>=REGEXP && this.input.LA(1)<=LOCATION) ) {
  876.                 this.input.consume();
  877.                 this.adaptor.addChild(root_0, this.adaptor.create(set17));
  878.                 this.state.errorRecovery=false;
  879.             }
  880.             else {
  881.                 var mse = new org.antlr.runtime.MismatchedSetException(null,this.input);
  882.                 throw mse;
  883.             }
  884.  
  885.  
  886.  
  887.  
  888.             retval.stop = this.input.LT(-1);
  889.  
  890.             retval.tree = this.adaptor.rulePostProcessing(root_0);
  891.             this.adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
  892.  
  893.         }
  894.         catch (re) {
  895.             if (re instanceof org.antlr.runtime.RecognitionException) {
  896.                 this.reportError(re);
  897.                 this.recover(this.input,re);
  898.                 retval.tree = this.adaptor.errorNode(this.input, retval.start, this.input.LT(-1), re);
  899.             } else {
  900.                 throw re;
  901.             }
  902.         }
  903.         finally {
  904.         }
  905.         return retval;
  906.     },
  907.  
  908.     // inline static return class
  909.     action_return: (function() {
  910.         ABEParser.action_return = function(){};
  911.         org.antlr.lang.extend(ABEParser.action_return,
  912.                           org.antlr.runtime.ParserRuleReturnScope,
  913.         {
  914.             getTree: function() { return this.tree; }
  915.         });
  916.         return;
  917.     })(),
  918.  
  919.     // X:\\CVS\\mozilla\\noscript\\ABE\\0.6\\ABE.g:31:1: action : ( A_DENY | A_LOGOUT | A_SANDBOX | A_ACCEPT );
  920.     // $ANTLR start "action"
  921.     action: function() {
  922.         var retval = new ABEParser.action_return();
  923.         retval.start = this.input.LT(1);
  924.  
  925.         var root_0 = null;
  926.  
  927.         var set18 = null;
  928.  
  929.         var set18_tree=null;
  930.  
  931.         try {
  932.             // X:\\CVS\\mozilla\\noscript\\ABE\\0.6\\ABE.g:31:11: ( A_DENY | A_LOGOUT | A_SANDBOX | A_ACCEPT )
  933.             // X:\\CVS\\mozilla\\noscript\\ABE\\0.6\\ABE.g:
  934.             root_0 = this.adaptor.nil();
  935.  
  936.             set18=this.input.LT(1);
  937.             if ( (this.input.LA(1)>=A_DENY && this.input.LA(1)<=A_ACCEPT) ) {
  938.                 this.input.consume();
  939.                 this.adaptor.addChild(root_0, this.adaptor.create(set18));
  940.                 this.state.errorRecovery=false;
  941.             }
  942.             else {
  943.                 var mse = new org.antlr.runtime.MismatchedSetException(null,this.input);
  944.                 throw mse;
  945.             }
  946.  
  947.  
  948.  
  949.  
  950.             retval.stop = this.input.LT(-1);
  951.  
  952.             retval.tree = this.adaptor.rulePostProcessing(root_0);
  953.             this.adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
  954.  
  955.         }
  956.         catch (re) {
  957.             if (re instanceof org.antlr.runtime.RecognitionException) {
  958.                 this.reportError(re);
  959.                 this.recover(this.input,re);
  960.                 retval.tree = this.adaptor.errorNode(this.input, retval.start, this.input.LT(-1), re);
  961.             } else {
  962.                 throw re;
  963.             }
  964.         }
  965.         finally {
  966.         }
  967.         return retval;
  968.     }
  969.  
  970.     // Delegated rules
  971.  
  972.  
  973.  
  974.  
  975. }, true); // important to pass true to overwrite default implementations
  976.  
  977.  
  978.  
  979. // public class variables
  980. org.antlr.lang.augmentObject(ABEParser, {
  981.     tokenNames: ["<invalid>", "<EOR>", "<DOWN>", "<UP>", "T_ACTION", "T_METHODS", "ALL", "HTTPVERB", "SUB", "T_FROM", "T_SITE", "REGEXP", "GLOB", "URI", "LOCATION", "A_DENY", "A_LOGOUT", "A_SANDBOX", "A_ACCEPT", "URI_START", "URI_PART", "WS", "COMMENT"],
  982.     FOLLOW_rule_in_ruleset49: new org.antlr.runtime.BitSet([0x00000400, 0x00000000]),
  983.     FOLLOW_EOF_in_ruleset52: new org.antlr.runtime.BitSet([0x00000002, 0x00000000]),
  984.     FOLLOW_subject_in_rule65: new org.antlr.runtime.BitSet([0x00078000, 0x00000000]),
  985.     FOLLOW_predicate_in_rule67: new org.antlr.runtime.BitSet([0x00078002, 0x00000000]),
  986.     FOLLOW_action_in_predicate84: new org.antlr.runtime.BitSet([0x000003C2, 0x00000000]),
  987.     FOLLOW_methods_in_predicate86: new org.antlr.runtime.BitSet([0x00000202, 0x00000000]),
  988.     FOLLOW_origin_in_predicate89: new org.antlr.runtime.BitSet([0x00000002, 0x00000000]),
  989.     FOLLOW_method_in_methods115: new org.antlr.runtime.BitSet([0x00000182, 0x00000000]),
  990.     FOLLOW_ALL_in_methods120: new org.antlr.runtime.BitSet([0x00000002, 0x00000000]),
  991.     FOLLOW_set_in_method132: new org.antlr.runtime.BitSet([0x00000002, 0x00000000]),
  992.     FOLLOW_T_FROM_in_origin149: new org.antlr.runtime.BitSet([0x00007840, 0x00000000]),
  993.     FOLLOW_resources_in_origin151: new org.antlr.runtime.BitSet([0x00000002, 0x00000000]),
  994.     FOLLOW_T_SITE_in_subject162: new org.antlr.runtime.BitSet([0x00007840, 0x00000000]),
  995.     FOLLOW_resources_in_subject164: new org.antlr.runtime.BitSet([0x00000002, 0x00000000]),
  996.     FOLLOW_resource_in_resources173: new org.antlr.runtime.BitSet([0x00007802, 0x00000000]),
  997.     FOLLOW_ALL_in_resources178: new org.antlr.runtime.BitSet([0x00000002, 0x00000000]),
  998.     FOLLOW_set_in_resource0: new org.antlr.runtime.BitSet([0x00000002, 0x00000000]),
  999.     FOLLOW_set_in_action0: new org.antlr.runtime.BitSet([0x00000002, 0x00000000])
  1000. });
  1001.  
  1002. })();